package edu.whu.assignment5.repository;

import edu.whu.assignment5.dataobject.Supplier;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

@Repository
public interface SupplierRepository extends JpaRepository<Supplier, Integer> {
    Supplier findBySid(int sid);

    @Transactional
    @Modifying
    int deleteBySid(int sid);
}
